﻿<Page
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:PartTwo" x:Class="PartTwo.MainScreen" 
             mc:Ignorable="d" >
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="SearchResultsStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>

        </ResourceDictionary>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <TextBlock Margin="20,10" FontSize="40" FontFamily="Segoe UI" Foreground="#FF0C95D6" Text="syno player" />
        <StackPanel Margin="35,0" Grid.Row="1" Orientation="Horizontal">
            <TextBlock Margin="5,0" FontSize="25" FontFamily="Segoe UI" Foreground="#FF40A8F1" Text="artist"/>
            <TextBlock Margin="5,0" FontSize="25" FontFamily="Segoe UI" Foreground="#FF40A8F1" Text="album"/>
            <TextBlock Margin="5,0" FontSize="25" FontFamily="Segoe UI" Foreground="#FF40A8F1" Text="genre"/>
            <TextBlock Margin="5,0" FontSize="25" FontFamily="Segoe UI" Foreground="#FF40A8F1" Text="all"/>
            <TextBox x:Name="SearchBox" Width="200"/>
            <Button Content="Search" Command="{Binding SearchCommand}" CommandParameter="{Binding Text, ElementName=SearchBox}" />
        </StackPanel>
       

        <ListBox HorizontalContentAlignment="Stretch" ItemsSource="{Binding SearchResults}" Grid.Row="2" Margin="10" ItemTemplate="{DynamicResource SearchResults}" Style="{DynamicResource SearchResultsTemplate}" BorderBrush="{x:Null}" />
        <ListView Width="300" Grid.Column="1" Grid.Row="2" ItemsSource="{Binding Playlist}" >
            <ListView.View>
                <GridView AllowsColumnReorder="True">
                    <GridViewColumn DisplayMemberBinding="{Binding TrackInfo, Path=Title}" Width="100">
                        <GridViewColumnHeader>Track title</GridViewColumnHeader>
                    </GridViewColumn>
                    <GridViewColumn DisplayMemberBinding="{Binding TrackInfo, Path=Album}">
                        <GridViewColumnHeader>Album</GridViewColumnHeader>
                    </GridViewColumn>
                    <GridViewColumn DisplayMemberBinding="{Binding TrackInfo, Path=Artist}">
                        <GridViewColumnHeader>Artist</GridViewColumnHeader>
                    </GridViewColumn>
                    <GridViewColumn DisplayMemberBinding="{Binding TrackInfo, Path=Duration}">
                        <GridViewColumnHeader>Duration</GridViewColumnHeader>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>

    </Grid>
</Page>
